package com.ipartek.pruebas.capitulo10;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class LeerFicheroTextoP1 {

	public static void main(String[] args) {
		FileReader fr = null;
		BufferedReader bf = null;
		try {
		
			fr = new FileReader("fichero.txt");
			bf = new BufferedReader(fr);
			String sCadena;
			while ((sCadena = bf.readLine())!=null) {
				System.out.println(sCadena);
			} 
				
			 
		} catch (FileNotFoundException fnfe){
			fnfe.printStackTrace();
		} catch (IOException ioe){
			ioe.printStackTrace();
		}
		finally{
			try {
				bf.close();
				fr.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		
	}

}
